package the.broccoli.auth.aop;

import org.apache.shiro.aop.AnnotationResolver;
import org.apache.shiro.authz.aop.RoleAnnotationMethodInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import the.broccoli.auth.converter.MultiPurposeAuthorizingObjectConverter;

public class RoleAnnotationConvertableMethodInterceptor extends RoleAnnotationMethodInterceptor {
    private static final Logger logger = LoggerFactory.getLogger(RoleAnnotationConvertableMethodInterceptor.class);

    public RoleAnnotationConvertableMethodInterceptor(AnnotationResolver annotationResolver, MultiPurposeAuthorizingObjectConverter multiPurposeAuthorizingObjectConverter) {
        this.setResolver(annotationResolver);
        this.setHandler(new RoleAnnotationConvertableHandler(multiPurposeAuthorizingObjectConverter));
    }
}
